<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    info: { type: Object, required: true },
  },
});
</script>

<template>
  <view class="interview-item">
    <view class="interview-item-content">
      <view class="interview-item-info">
        <view class="interview-item-name">{{ info.guider_name }}</view>
        <view class="interview-item-tag" v-if="info.tag">{{ info.tag }}</view>
      </view>
      <view class="interview-item-position">
        <image
          class="interview-item-position2"
          src="/static/index-interview.png"
        />
        {{ info.city_name }}
      </view>
      <view class="interview-item-desc">{{ info.good_at }}</view>
    </view>
    <image class="interview-item-bg" src="/static/index-interview2.png" />
    <view class="interview-item-intro">
      <image class="interview-item-intro2" src="/static/index-interview3.png" />
      <view class="interview-item-intro3">{{ info.desc }}</view>
    </view>
    <image class="interview-item-img" :src="info.pic_url" mode="aspectFill" />
  </view>
</template>

<style lang="scss">
.interview-item {
  position: relative;
  padding: 30rpx 240rpx 28rpx 20rpx;
  background: rgba(255, 121, 0, 0.05);

  .interview-item-content {
    padding-left: 30rpx;
    padding-right: 20rpx;
    margin-bottom: 20rpx;
  }

  .interview-item-info {
    display: flex;
    align-items: center;
    margin-bottom: 4rpx;
  }

  .interview-item-name {
    min-width: 0;
    font-size: 36rpx;
    color: #333333;
    line-height: 50rpx;
    font-weight: bold;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .interview-item-tag {
    flex-shrink: 0;
    padding: 0 8rpx;
    margin-left: 20rpx;
    font-size: 20rpx;
    color: #ff7900;
    line-height: 24rpx;
    border-radius: 16rpx;
    border: 2rpx solid #ff7900;
    background-color: rgba(255, 121, 0, 0.08);
  }

  .interview-item-position {
    display: flex;
    align-items: center;
    height: 34rpx;
    margin-bottom: 4rpx;
    font-size: 24rpx;
    color: #ff7900;
  }

  .interview-item-position2 {
    width: 14rpx;
    height: 16rpx;
    margin-right: 10rpx;
  }

  .interview-item-desc {
    font-size: 24rpx;
    color: #999999;
    line-height: 34rpx;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .interview-item-intro {
    position: relative;
    padding: 26rpx 40rpx 16rpx 30rpx;
    width: 360rpx;
    border-radius: 20rpx 0 0 20rpx;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 -2rpx 4rpx 0 #ffffff inset,
      0 2rpx 6rpx 0 rgba(255, 121, 0, 0.15) inset;
  }

  .interview-item-intro2 {
    position: absolute;
    left: 30rpx;
    top: 20rpx;
    width: 28rpx;
    height: 20rpx;
  }

  .interview-item-intro3 {
    height: 102rpx;
    font-size: 24rpx;
    color: #666666;
    line-height: 34rpx;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .interview-item-img {
    position: absolute;
    top: 20rpx;
    right: 20rpx;
    width: 230rpx;
    height: 308rpx;
    border-radius: 20rpx;
  }

  .interview-item-bg {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 136rpx;
    height: 152rpx;
  }
}
</style>